/* GUI CONVERTED from reworp.p (converter v1.75) Thu Oct  5 12:01:16 2000 */
/* reworp.p - WORK ORDER REPORT wo_type = "C" REPETITIVE CUMULATIVE ORDER    */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                       */
/* All rights reserved worldwide.  This is an unpublished work.              */
/*F0PN*/ /*V8:ConvertMode=Report                                             */
/* REVISION: 1.0      LAST MODIFIED: 04/15/86   BY: PML       */
/* REVISION: 1.0      LAST MODIFIED: 05/01/86   BY: EMB       */
/* REVISION: 2.1      LAST MODIFIED: 10/19/87   BY: WUG *A94* */
/* REVISION: 2.1      LAST MODIFIED: 12/29/87   BY: EMB       */
/* REVISION: 4.0      LAST MODIFIED: 02/16/88   BY: FLM *A175**/
/* REVISION: 4.0      LAST MODIFIED: 03/23/88   BY: RL  *A171**/
/* REVISION: 5.0      LAST MODIFIED: 04/10/89   BY: MLB *B096**/
/* REVISION: 6.0      LAST MODIFIED: 09/25/90   BY: SMM   *D072*/
/* REVISION: 6.0      LAST MODIFIED: 11/20/90   BY: emb *D223**/
/* REVISION: 7.0      LAST MODIFIED: 03/01/92   BY: smm *F230*/
/* Revision: 7.3        Last edit: 11/19/92             By: jcd *G348* */
/* Revision: 7.3        Last edit: 08/30/94             By: pxd *FQ58* */
/* REVISION: 7.5      LAST MODIFIED: 10/07/94   BY: TAF *J035*/
/* REVISION: 8.6      LAST MODIFIED: 10/14/97   BY: GYK *K0Z2*               */
/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane         */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan        */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane  */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* myb               */
/* REVISION: 9.1      LAST MODIFIED: 09/11/00   BY: *N0RQ* Mudit Mehta       */

 /*K0Z2*/ /* DISPLAY TITLE */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

 /*K0Z2*/ {mfdtitle.i "b+ "}

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE reworp_p_1 "Qty Open"
/* MaxLen: Comment: */

&SCOPED-DEFINE reworp_p_2 "Work Order/!Batch"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

          define variable vend like wo_vend.
          define variable nbr like wo_nbr.
          define variable nbr1 like wo_nbr.
          define variable lot like wo_lot.
          define variable part like wo_part.
          define variable part1 like wo_part.
          define variable rel like wo_rel_date.
          define variable rel1 like wo_rel_date.
          define variable due like wo_due_date.
          define variable due1 like wo_due_date.
          define variable so_job like wo_so_job.
          define variable so_job1 like wo_so_job.
          define variable qty_open like wo_qty_ord label {&reworp_p_1}.
/*D072*/  define variable site like rps_site.
/*F230*/  define variable prline like rps_line.

          
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
             
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
nbr            colon 20 nbr1           label {t001.i} colon 49 skip
             part           colon 20 part1          label {t001.i} colon 49 skip
             so_job         colon 20 so_job1        label {t001.i} colon 49
             skip (1)
/*D072*/     site           colon 20 skip
/*F230*/     prline         colon 20 skip
             lot            colon 20 skip
             vend           colon 20 skip
          with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



          /* SET EXTERNAL LABELS */
          setFrameLabels(frame a:handle).

/*K0Z2*/ {wbrp01.i}
          repeat:

             if nbr1 = hi_char then nbr1 = "".
             if part1 = hi_char then part1 = "".

/*D072* Add Site */

/*K0Z2*/    if c-application-mode <> 'web' then
            update
               nbr nbr1
               part part1
               so_job so_job1
               site
/*F230*/       prline
               lot vend
            with frame a.

/*K0Z2*/    {wbrp06.i &command = update &fields = "  nbr nbr1 part part1 so_job
             so_job1 site  prline lot vend" &frm = "a"}

/*K0Z2*/    if (c-application-mode <> 'web') or
/*K0Z2*/       (c-application-mode = 'web' and
/*K0Z2*/       (c-web-request begins 'data'))
            then do:

               bcdparm = "".
               {mfquoter.i nbr     }
               {mfquoter.i nbr1    }
               {mfquoter.i part    }
               {mfquoter.i part1   }
               {mfquoter.i so_job  }
               {mfquoter.i so_job1 }
/*D072*/       {mfquoter.i site   }
/*F230*/       {mfquoter.i prline }
               {mfquoter.i lot     }
               {mfquoter.i vend    }

               if nbr1 = "" then nbr1 = hi_char.
               if part1 = "" then part1 = hi_char.

/*K0Z2*/    end.

            /* SELECT PRINTER */
            {mfselbpr.i "printer" 132}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.

            {mfphead.i}

            /* FIND AND DISPLAY */
            for each wo_mstr where wo_type = "C"
            and (wo_nbr >= nbr and wo_nbr <= nbr1)
            and (wo_lot = lot or lot = "")
            and (wo_part >= part and wo_part <= part1)
            and (wo_vend = vend or vend = "")
/*D072*/    and (wo_site = site or site = "")
/*FQ58* /*F230*/and (wo_site = prline or prline = "")    */
/*FQ58*/    and (wo_line = prline or prline = "")
            and (wo_so_job >= so_job) and (wo_so_job <= so_job or so_job = "")
/*N0RQ*     no-lock use-index wo_type_nbr with width 132 no-attr-space: */
/*N0RQ*/    no-lock use-index wo_type_nbr
/*N0RQ*/    with frame f-a width 132 no-attr-space:

               /* SET EXTERNAL LABELS */
/*N0RQ*/       setFrameLabels(frame f-a:handle).

               
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/
                     /*G348*/

               find pt_mstr where pt_part = wo_part no-lock no-error.

               if page-size - line-counter < 3 then page.

/*J035*        display wo_nbr wo_lot wo_site */
/*J035*/       display
                  wo_nbr column-label {&reworp_p_2}
                  wo_lot
                  wo_site
/*F230*/          wo_line
                  wo_part format "x(27)"
                  wo_qty_comp
                  wo_qty_rjct
                  wo_so_job
                  wo_vend
                  wo_status WITH STREAM-IO /*GUI*/ .

/*B096*/       down 1.
/*J035*/       display
                  wo_batch @ wo_nbr WITH STREAM-IO /*GUI*/ .
/*B096*/       if available pt_mstr and pt_desc1 > "" then
               display
                  "   " + pt_desc1 @ wo_part WITH STREAM-IO /*GUI*/ .

/*B096*/       if available pt_mstr and pt_desc2 > "" and pt_desc1 > "" then
                  down 1.
               if available pt_mstr and pt_desc2 > "" then
                  display "   " + pt_desc2 @ wo_part WITH STREAM-IO /*GUI*/ .

            end.

            {mfrtrail.i}

         end.

/*K0Z2*/ {wbrp04.i &frame-spec = a}
